<script type="text/javascript" language="javascript">
    <!--
    function onSuccessStarpk(oMessage)
    {
        var countArray = oMessage.split(";");
        var patrn=/^[0-9]*$/;
        if (!patrn.exec(countArray[0]))
            alert(oMessage);
        else
        {
            $("#pStarFirst").html(countArray[0]);
            $("#pStarSecond").html(countArray[1]);
            //alert(oMessage);
        }
    }

    function onErrorStarpk(x, e)
    {
        alert(x.responseText);
        //$("#btnQuestion").attr("disabled",false);
    }

    function onStarpkClick(flag)
    {
        var id = <?php echo $pkId; ?>;
        var random = Math.random();
        $.ajax({url:"<?php echo url_for("other/jQuery");?>",data:"random=" + random +"&submitflag=starpk&id=" + id +"&starpkFlag=" + flag ,success: onSuccessStarpk,error:onErrorStarpk});
    }
    //-->
</script>
         <div class="men_pk">
               <h2><div class="com_tit">美男PK<span>BOY FIGHT</span></div></h2>
           <div class="pk_box">
              <div class="pk_left_num"><img src="/images/pk_left.jpg" /><p id="pStarFirst"><?php echo $pkArray[0]["count"]; ?></p></div>
              <div class="pk_img">
                <div class="pk_pic">
                  <?php

                          echo "<img src=\"".$pkArray[0]["imgUrl"]."\" class=\"pk_img1\" >"."\r\n";
                          echo "<img src=\"".$pkArray[1]["imgUrl"]."\" class=\"pk_img2\" >"."\r\n";
                  ?>
                  <img class="pk_word" src="/images/pk.gif" />
                </div>
                <div class="pk_select"><a href="javascript:onStarpkClick(1);" class="pk01"></a><a href="javascript:onStarpkClick(2);" class="pk02"></a></div>
              </div>
              <div class="pk_right_num"><img src="/images/pk_right.jpg" /><p id="pStarSecond"><?php echo $pkArray[1]["count"]; ?></p></div>
           </div>
         </div>
